  <div id="wrap">

  <% if session[:user] != nil %>

    <!-Blue Bar Start-->

    <div id="bluebar">

      <div id="logo">

        <a href="">APO - Alpha Alpha Chapter</a>

      </div>

      <div id="navbar">

        <ul>

          <li onmouseover="showit(0)"><%= link_to_unless_current "Home", :controller => "apo", :action => "home" %></li>

          <li onmouseover="showit(1)"><%= link_to_unless_current "Members", :controller => "members", :action => "list" %></li>

          <li onmouseover="showit(0)"><%= link_to_unless_current "Documents", :controller => "documents", :action => "list" %></li>

          <li onmouseover="showit(2)"><%= link_to_unless_current "Events", :controller => "events", :action => "list" %></li>

          <li onmouseover="showit(3)"><%= link_to_unless_current "Profile", :controller => "members", :action => "show", :id => session[:user] %></li>
		  <% if session[:user].admin %>
          <li onmouseover="showit(0)"><%= link_to_unless_current "Admin", :controller => "members", :action => "admin" %></li>
		  <% end %>
          <li onmouseover="showit(0)"><%= link_to "Contact", {:controller => "emailer", :action => "comments"}, :popup => ['new_window', 'height=285,width=350'] %></li>

        </ul>

      </div>

      <div id="search">

      <% form_tag :controller => "apo", :action => "name_select_show" do %>
      <%= text_field_with_auto_complete :member, :name, {:value => "find member", :class => "search-textarea"}, :url => {:controller => "apo", :action => "auto_complete_for_member_name", :class => "search-textarea-2"}, :skip_style => true %>
      <% end %>

      </div>

    </div>

    <!--Blue Bar End-->

    <!--Black Bar Start-->

    <div id="blackbar">

      <div id="subnavbar">

        <div id="describe" onMouseover="clear_delayhide()" onMouseout="resetit(event)"></div>

      </div>

      <script language="JavaScript1.2">

      /*
      Tabs Menu (mouseover)- By Dynamic Drive
      For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
      This credit MUST stay intact for use
      */

      var submenu=new Array()

      //Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.
 
      submenu[0]=' '

      submenu[1]='<ul> <li><%= link_to_unless_current "Officers", :controller => "members", :action => "officers" %></li>  <li>|</li> <li><%= link_to_unless_current "Committees", :controller => "members", :action => "committees" %></li> </ul>'

      submenu[2]='<ul> <li><%= link_to_unless_current "Calendar", :controller => "events", :action => "calendar" %></li>  <li>|</li> <li><%= link_to_unless_current "Upcoming Events", :controller => "events", :action => "list" %></li> <li>|</li> <li><%= link_to_unless_current "Past Events", :controller => "events", :action => "old_list" %></li> <li>|</li> <li><%= link_to_unless_current "Past Semesters", :controller => "events", :action => "old_semester_list" %></li> </ul>'

      submenu[3]='<ul> <li><%= link_to "Logout", :controller => "apo", :action => "logout" %></li> </ul>'

      //Set delay before submenu disappears after mouse moves out of it (in milliseconds)
      var delay_hide=500

      /////No need to edit beyond here

      var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers?       document.dep1.document.dep2 : ""

      function showit(which){
      clear_delayhide()
      thecontent=(which==-1)? "" : submenu[which]
      if (document.getElementById||document.all)
      menuobj.innerHTML=thecontent
      else if (document.layers){
      menuobj.document.write(thecontent)
      menuobj.document.close()
      }
      }

      function resetit(e){
      if (document.all&&!menuobj.contains(e.toElement))
      delayhide=setTimeout("showit(-1)",delay_hide)
      else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
      delayhide=setTimeout("showit(-1)",delay_hide)
      }

      function clear_delayhide(){
      if (window.delayhide)
      clearTimeout(delayhide)
      }

      function contains_ns6(a, b) {
      while (b.parentNode)
      if ((b = b.parentNode) == a)
      return true;
      return false;
      }

      </script>

      <div id="shoutouts-text">

        <div class="recent-shoutouts">Recent Shoutouts!</div>

        </ul>

      </div>

    </div>

    <!--Black Bar End-->

  <% else %>

    <!-Blue Bar Start-->

    <div id="bluebar">

      <div id="logo">

        <a href="index.html">APO - Alpha Alpha Chapter</a>

      </div>

      <div id="navbar">

        <ul>

          <li<%= current_page?(:action => 'about')?' id="nav-current"':'' %>><%= link_to_unless_current "About APO", :action => "about" %></li>

          <li<%= current_page?(:action => 'umoc')?' id="nav-current"':'' %>><%= link_to_unless_current "Ugly Man on Campus", :controller => "apo", :action => "umoc" %></li>

          <li<%= current_page?(:action => 'login')?' id="nav-current"':'' %>><%= link_to_unless_current("Login", {:action => "login"}) %></li>

        </ul>

      </div>

      <div id="search">

      </div>

    </div>

    <!--Blue Bar End-->

    <!--Black Bar Start-->

    <div id="blackbar">

      <div id="subnavbar" onmouseover="clear_delayhide()" onmouseout="resetit(event)"><% if flash[:error] %>
	<div id="noticeWrapper">
		<div class="noticeBox"><%= flash[:error] %></div>
	</div>
<% end %></div>

      <div id="shoutouts-text">

        <div class="recent-shoutouts"><%= current_page?(:action => 'home')?'Recent Shoutouts!':'' %></div>

        </ul>

      </div>

    </div>

    <!--Black Bar End-->

  <% end %>